import logging,yagmail
def log_set():
    logging.basicConfig(filename="log.txt",filemode="w+",level=logging.DEBUG,format="%(filename)s  -> %(asctime)s  -> %(lineno)d -> %(message)s")
def send_mail(filepath):
    mail = yagmail.SMTP(user="2930885223@qq.com",password="ilarvpztxodrdgha",host="smtp.qq.com")
    mail.send(to="2930885223@qq.com",subject="鸡内报告",contents="测试报告已完成，请查收",attachments=filepath)
